package com.angel.dao.health;

import com.angel.core.base.BaseMapper;
import com.angel.health.SysMenu;
import com.angel.health.SysRole;
import com.angel.health.SysRoleExample;
import com.angel.health.SysRoleExt;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

public interface SysRoleMapper extends BaseMapper<SysRole>{
    int countByExample(SysRoleExample example);

    int deleteByExample(SysRoleExample example);

    int deleteByPrimaryKey(Integer id);

//    int insert(SysRole record);

    int insertSelective(SysRole record);

    List<SysRole> selectByExample(SysRoleExample example);

    SysRole selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") SysRole record, @Param("example") SysRoleExample example);

    int updateByExample(@Param("record") SysRole record, @Param("example") SysRoleExample example);

//    int updateByPrimaryKeySelective(SysRole record);

    int updateByPrimaryKey(SysRole record);

	List<SysRole> findAllRole();
	
	List<SysRoleExt> findUserById(SysRole record);

	List<SysRole> findRolesByUser(Integer userId);

	List<Map<String, Object>> showRoleUsers(Integer id);

	List<SysMenu> findMenuByRole(Integer id);
}